<script setup lang="ts">
//加载动画
import { ref, onMounted } from "vue";

const loaded = ref(true); // 标记是否加载完成
onMounted(() => {
  // 模拟数据加载完成
  setTimeout(() => {
    loaded.value = false;
  }, 1000);
});
</script>
<template>
  <div class="loading">
    <div class="fade-in-out" :class="{ show: loaded }">
      <!-- 加载动画的内容 -->
    </div>
  </div>
</template>
<style scoped lang="less">
.fade-in-out {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.fade-in-out.show {
  opacity: 1;
}
</style>
